<template>
  <div id="app">
<<<<<<< HEAD
    <el-row class="main">
      <el-col :span="8" :offset="8">
        <el-card class="box-card">
          <el-form ref="form" :model="form" label-width="60px">
            <el-form-item label="用户名">
              <el-input v-model="form.name"></el-input>
            </el-form-item>
            <el-form-item label="密码">
              <el-input v-model="form.password"></el-input>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" @click="login">登录</el-button>
              <el-button @click="register">注册</el-button>
            </el-form-item>
          </el-form>
        </el-card>
      </el-col>
    </el-row>
=======
    <router-view/>
>>>>>>> 61d3bf321415552c957cbeec53bebd599b983e46
  </div>
</template>

<script>
  export default {
<<<<<<< HEAD
    data() {
      return {
        form: {
          name: '',
          password: ''
        }
      }
    },
    methods: {
      login() {
        let _this = this;
        axios.post('http://localhost:8888/user/login', this.form).then(function (res) {
          _this.notify(res.data.data)
        })
      },
      register() {
        let _this = this;
        axios.post('http://localhost:8888/user/register', {
          name: this.form.name,
          password: this.form.password
        }).then(function (res) {
          _this.notify(res.data.data)
        })

      },
      notify(msg) {
        this.$notify({
          title: '提示',
          message: msg,
          duration:1500
        });
      }
    }
=======
>>>>>>> 61d3bf321415552c957cbeec53bebd599b983e46
  }
</script>
<style>
#app {
  font-family: Helvetica, sans-serif;
  text-align: center;
}
  .form_main{
    margin-top: 200px;
  }
</style>
